{% extends "templates/base.html" %}

{% block content %}
<div class="gallery">
    <h2>Upload an image</h2>
    {% if error %}
    <p class="error">{{error}}</p>
    {% endif %}

    {% if image %}
    <img src="{{image}}" width="300" height="300">
    {% endif %}

    <form action="{{context}}/upload" enctype="multipart/form-data" method="post">
        <input type="file" id="file" name="file">
        <input type="submit" value="upload">
    </form>
</div>
{% endblock %}